.class public Les/dt;
.super Ljava/lang/Object;
.source "SceneNotification.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/dt$b;
    }
.end annotation


# instance fields
.field protected a:Landroid/content/Context;

.field protected b:Landroid/app/NotificationManager;

.field protected c:Les/dt$b;

.field protected d:Les/et;

.field protected e:Lcom/estrongs/android/pop/app/scene/show/notification/style/a;

.field protected f:I

.field protected g:I


# direct methods
.method public constructor <init>(Landroid/content/Context;Les/et;Lcom/estrongs/android/pop/app/scene/show/notification/style/a;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    invoke-virtual {p0, p1, p2, p3}, Les/dt;->a(Landroid/content/Context;Les/et;Lcom/estrongs/android/pop/app/scene/show/notification/style/a;)V

    return-void
.end method

.method static synthetic a(Les/dt;)Ljava/lang/String;
    .locals 0

    .line 2
    invoke-direct {p0}, Les/dt;->g()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method private a(Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;)V
    .locals 8

    .line 12
    invoke-direct {p0}, Les/dt;->i()V

    .line 13
    iget-object v0, p0, Les/dt;->b:Landroid/app/NotificationManager;

    iget-object v1, p0, Les/dt;->d:Les/et;

    invoke-virtual {v1}, Les/et;->a()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/app/NotificationManager;->cancel(I)V

    .line 14
    new-instance v0, Landroidx/core/app/NotificationCompat$Builder;

    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;-><init>(Landroid/content/Context;)V

    const/4 v1, 0x1

    .line 15
    invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setVisibility(I)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    const/high16 v2, 0x7f0e0000

    .line 16
    invoke-virtual {v0, v2}, Landroidx/core/app/NotificationCompat$Builder;->setSmallIcon(I)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    iget-object v2, p1, Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;->a:Landroid/widget/RemoteViews;

    .line 17
    invoke-virtual {v0, v2}, Landroidx/core/app/NotificationCompat$Builder;->setContent(Landroid/widget/RemoteViews;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    iget-object v2, p0, Les/dt;->a:Landroid/content/Context;

    .line 18
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    long-to-int v4, v3

    invoke-virtual {p0}, Les/dt;->b()Landroid/content/Intent;

    move-result-object v3

    const/high16 v5, 0x10000000

    .line 19
    invoke-static {v2, v4, v3, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroidx/core/app/NotificationCompat$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    move-result-object v0

    .line 20
    iget-boolean v2, p1, Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;->c:Z

    const/4 v3, 0x2

    if-eqz v2, :cond_0

    .line 21
    invoke-virtual {v0, v3}, Landroidx/core/app/NotificationCompat$Builder;->setDefaults(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 22
    invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setPriority(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 23
    :cond_0
    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    .line 24
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v6

    long-to-int v2, v6

    invoke-virtual {p0}, Les/dt;->a()Landroid/content/Intent;

    move-result-object v4

    .line 25
    invoke-static {v1, v2, v4, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v1

    .line 26
    invoke-virtual {v0, v1}, Landroidx/core/app/NotificationCompat$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$Builder;

    .line 27
    iget-object v1, p1, Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;->b:Landroid/widget/RemoteViews;

    if-eqz v1, :cond_1

    .line 28
    invoke-virtual {v0, v3}, Landroidx/core/app/NotificationCompat$Builder;->setPriority(I)Landroidx/core/app/NotificationCompat$Builder;

    .line 29
    :cond_1
    invoke-virtual {v0}, Landroidx/core/app/NotificationCompat$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    .line 30
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x10

    if-lt v1, v2, :cond_2

    iget-object p1, p1, Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;->b:Landroid/widget/RemoteViews;

    if-eqz p1, :cond_2

    .line 31
    iput-object p1, v0, Landroid/app/Notification;->bigContentView:Landroid/widget/RemoteViews;

    .line 32
    :cond_2
    iget-object p1, p0, Les/dt;->b:Landroid/app/NotificationManager;

    iget-object v1, p0, Les/dt;->d:Les/et;

    invoke-virtual {v1}, Les/et;->a()I

    move-result v1

    invoke-virtual {p1, v1, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V

    .line 33
    invoke-virtual {p0}, Les/dt;->e()V

    return-void
.end method

.method static synthetic a(Les/dt;Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Les/dt;->a(Lcom/estrongs/android/pop/app/scene/show/notification/style/a$b;)V

    return-void
.end method

.method static synthetic b(Les/dt;)Ljava/lang/String;
    .locals 0

    .line 1
    invoke-direct {p0}, Les/dt;->h()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method private g()Ljava/lang/String;
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "com.estrongs.android.pop.app.scene.click.intent."

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Les/dt;->d:Les/et;

    invoke-virtual {v1}, Les/et;->a()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private h()Ljava/lang/String;
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "com.estrongs.android.pop.app.scene.delete.intent."

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Les/dt;->d:Les/et;

    invoke-virtual {v1}, Les/et;->a()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private i()V
    .locals 3

    .line 1
    :try_start_0
    iget-object v0, p0, Les/dt;->b:Landroid/app/NotificationManager;

    if-nez v0, :cond_0

    .line 2
    iget-object v0, p0, Les/dt;->a:Landroid/content/Context;

    const-string v1, "notification"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManager;

    iput-object v0, p0, Les/dt;->b:Landroid/app/NotificationManager;

    .line 3
    :cond_0
    iget-object v0, p0, Les/dt;->c:Les/dt$b;

    if-nez v0, :cond_1

    .line 4
    new-instance v0, Les/dt$b;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Les/dt$b;-><init>(Les/dt;Les/dt$a;)V

    iput-object v0, p0, Les/dt;->c:Les/dt$b;

    .line 5
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    .line 6
    invoke-direct {p0}, Les/dt;->g()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 7
    invoke-direct {p0}, Les/dt;->h()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 8
    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    iget-object v2, p0, Les/dt;->c:Les/dt$b;

    invoke-virtual {v1, v2, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    .line 9
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    :cond_1
    :goto_0
    return-void
.end method


# virtual methods
.method protected a()Landroid/content/Intent;
    .locals 2

    .line 10
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 11
    invoke-direct {p0}, Les/dt;->g()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method public a(Landroid/content/Context;Les/et;Lcom/estrongs/android/pop/app/scene/show/notification/style/a;)V
    .locals 0

    .line 3
    invoke-virtual {p0}, Les/dt;->c()V

    .line 4
    iput-object p1, p0, Les/dt;->a:Landroid/content/Context;

    .line 5
    iput-object p2, p0, Les/dt;->d:Les/et;

    .line 6
    iput-object p3, p0, Les/dt;->e:Lcom/estrongs/android/pop/app/scene/show/notification/style/a;

    .line 7
    invoke-virtual {p2}, Les/et;->c()I

    move-result p1

    iput p1, p0, Les/dt;->f:I

    .line 8
    iget-object p1, p0, Les/dt;->d:Les/et;

    invoke-virtual {p1}, Les/et;->b()I

    move-result p1

    iput p1, p0, Les/dt;->g:I

    return-void
.end method

.method protected a(Z)V
    .locals 3

    .line 9
    invoke-static {}, Les/wp;->g()Les/wp;

    move-result-object v0

    iget v1, p0, Les/dt;->f:I

    iget v2, p0, Les/dt;->g:I

    invoke-virtual {v0, v1, v2, p1}, Les/wp;->a(IIZ)V

    return-void
.end method

.method protected b()Landroid/content/Intent;
    .locals 2

    .line 2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 3
    invoke-direct {p0}, Les/dt;->h()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method public c()V
    .locals 3

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    if-eqz v1, :cond_0

    iget-object v1, p0, Les/dt;->c:Les/dt$b;

    if-eqz v1, :cond_0

    .line 2
    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    iget-object v2, p0, Les/dt;->c:Les/dt$b;

    invoke-virtual {v1, v2}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 3
    iput-object v0, p0, Les/dt;->c:Les/dt$b;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    .line 4
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 5
    :cond_0
    :goto_0
    iget-object v1, p0, Les/dt;->b:Landroid/app/NotificationManager;

    if-eqz v1, :cond_1

    .line 6
    iget-object v2, p0, Les/dt;->d:Les/et;

    invoke-virtual {v2}, Les/et;->a()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/app/NotificationManager;->cancel(I)V

    .line 7
    iput-object v0, p0, Les/dt;->b:Landroid/app/NotificationManager;

    .line 8
    :cond_1
    iget-object v1, p0, Les/dt;->a:Landroid/content/Context;

    if-eqz v1, :cond_2

    instance-of v1, v1, Lcom/estrongs/android/pop/FexApplication;

    if-nez v1, :cond_2

    .line 9
    iput-object v0, p0, Les/dt;->a:Landroid/content/Context;

    :cond_2
    return-void
.end method

.method protected d()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/dt;->d:Les/et;

    invoke-virtual {v0}, Les/et;->e()V

    .line 2
    invoke-virtual {p0}, Les/dt;->c()V

    return-void
.end method

.method protected e()V
    .locals 1

    const/4 v0, 0x1

    .line 1
    invoke-virtual {p0, v0}, Les/dt;->a(Z)V

    .line 2
    iget-object v0, p0, Les/dt;->d:Les/et;

    invoke-virtual {v0}, Les/et;->f()V

    return-void
.end method

.method public f()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/dt;->e:Lcom/estrongs/android/pop/app/scene/show/notification/style/a;

    if-eqz v0, :cond_1

    iget-object v0, p0, Les/dt;->d:Les/et;

    if-eqz v0, :cond_1

    iget v1, p0, Les/dt;->f:I

    if-lez v1, :cond_1

    iget v1, p0, Les/dt;->g:I

    if-lez v1, :cond_1

    .line 2
    invoke-virtual {v0}, Les/et;->d()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Les/dt;->e:Lcom/estrongs/android/pop/app/scene/show/notification/style/a;

    .line 3
    invoke-interface {v0}, Lcom/estrongs/android/pop/app/scene/show/notification/style/a;->isEnabled()Z

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    .line 4
    :cond_0
    iget-object v0, p0, Les/dt;->e:Lcom/estrongs/android/pop/app/scene/show/notification/style/a;

    new-instance v1, Les/dt$a;

    invoke-direct {v1, p0}, Les/dt$a;-><init>(Les/dt;)V

    invoke-interface {v0, v1}, Lcom/estrongs/android/pop/app/scene/show/notification/style/a;->a(Lcom/estrongs/android/pop/app/scene/show/notification/style/a$a;)V

    return-void

    :cond_1
    :goto_0
    const/4 v0, 0x0

    .line 5
    invoke-virtual {p0, v0}, Les/dt;->a(Z)V

    return-void
.end method
